<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@page import="java.util.List"%>
<%@page import="sdfi.lee.Entity.Platform"%>
<%@page import="sdfi.lee.DAO.PlatDAO"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="<c:url value='/css/common.css'></c:url>">
<script type="text/javascript" src="<c:url value='/js/jquery-1.6.js'></c:url>"></script>
<script>
	$(function(){
			
			$('div.hehe a img').css("width",'120px').css('height','100px');
			$('div.hehe>div:nth-child(odd)').addClass("enterprise_item1");
			$('div.hehe>div:nth-child(even)').addClass("enterprise_item2");
			
	});
	
 
	
</script>
<title></title>
</head>
<body>
<div class="hehe">
<%
	
List<Platform> list=new PlatDAO().getPlatform(5,Integer.valueOf(request.getParameter("pg")));

	if(null!=list&&list.size()>0)
	{
			request.setAttribute("list",list);
			
%>
	
		
		
			
				<c:forEach items="${requestScope.list}" var="plat" varStatus="status">
				<c:url value="/admin/platmf.jsp" var="platurl">
					<c:param name="platid" value="${plat.id}"></c:param>
				</c:url>
					<div>
			<table>
				<tr>
					<td>
						<a href="${platurl}"><img src="${plat.platPath}"></a>
					</td>
					<td>
						<a href="${platurl}">${plat.platname}</a>
					</td>
				</tr>
			</table>
				</div>
		
		</c:forEach>
			
	<%
	}
	%>
		</div>
		<div class="divclear">
		</div>
		<div	id="pages">
			<c:url value="/admin/platmg.jsp?pg=${param.pg-1}" var="up"></c:url>
			<c:url value="/admin/platmg.jsp?pg=${param.pg+1}" var="down"></c:url>
				<font>
					<c:choose>
						<c:when test="${param.pg==1}">&lt;</c:when>
						<c:otherwise><a href="${up}">&lt;</a></c:otherwise>
					</c:choose>
				</font>
				<font>${param.pg}</font>
				<font>
					<c:choose>
						<c:when test="${fn:length(list)<5}">&gt;</c:when>
						<c:otherwise><a href="${down}">&gt;</a></c:otherwise>
					</c:choose>
				</font>
		</div>
		
</html>